package com.example.mypplication.sortlist.newsortlist


import java.util.Comparator

class PinyinComparator : Comparator<SortModel> {
    override fun compare(o1: SortModel, o2: SortModel): Int {
        return when {
            o1.sortLetters == "@" || o2.sortLetters == "#" -> -1
            o1.sortLetters == "#" || o2.sortLetters == "@" -> 1
            else -> o1.sortLetters.compareTo(o2.sortLetters)
        }
    }
}